import { RouteConfig } from "vue-router";

const routes: RouteConfig[] = [
  {
    path: "/",
    component: () => import("layouts/MainLayout.vue"),
    children: [
      {
        path: "",
        name: "Profile",
        component: () => import("pages/Profile.vue")
      },
      {
        path: "contacts",
        name: "Contacts",
        component: () => import("pages/Contacts.vue")
      },
      {
        path: "room",
        name: "Room",
        component: () => import("pages/Room.vue")
      },
      {
        path: "settings",
        name: "Settings",
        component: () => import("pages/Settings.vue")
      }
    ]
  },
  {
    path: "/login",
    component: () => import("layouts/LoginLayout.vue"),
    children: [
      {
        path: "",
        name: "Login",
        component: () => import("pages/login/Login.vue")
      }
    ]
  },
  {
    path: "/register",
    component: () => import("layouts/LoginLayout.vue"),
    children: [
      {
        path: "",
        name: "Register",
        component: () => import("pages/login/Register.vue")
      }
    ]
  },

  // Always leave this as last one,
  // but you can also remove it
  {
    path: "*",
    component: () => import("pages/Error404.vue")
  }
];

export default routes;
